// 引入Express对象
var express = require('express');
var router = express.Router();
var multer = require('multer')

const verifyMiddleware = appRequire('routes/middleware/verify');

const user = appRequire('controllers/user/user');
const collect = appRequire('controllers/user/collect');
const artppt = appRequire('controllers/user/artppt');
const artPainting = appRequire('controllers/user/artPainting');
const artClass = appRequire('controllers/user/artClass');
const artTypeClass = appRequire('controllers/user/artTypeClass');
const artType = appRequire('controllers/user/artType');
const banner = appRequire('controllers/user/banner');
const creater = appRequire('controllers/user/creater');
const downLoad = appRequire('controllers/user/downLoad');
const order = appRequire('controllers/user/order');
const bgSetting = appRequire('controllers/user/bgSetting');
const todayQd = appRequire('controllers/user/todayQd');
const contentImage = appRequire('controllers/user/contentImage');//朋友圈文案接口
const discuss = appRequire('controllers/user/discuss');//评语接口
const poster = appRequire('controllers/user/poster');//教培海报相关接口
const baiduCourse = appRequire('controllers/user/baiduCourse');//百度网盘课程接口

router.post('/poster/opus', poster.opus); //同步
router.post('/poster/detail', poster.detail); //同步
router.post('/poster/type', poster.type); //同步
router.post('/poster/tagList', poster.tagList);
router.post('/poster/posterList', poster.posterList);
router.post('/poster/fontList', poster.fontList);
router.post('/poster/materialTagList', poster.materialTagList);
router.post('/poster/materialList', poster.materialList);
router.post('/poster/assemblyList', poster.assemblyList);
router.post('/poster/assemblyDet', poster.assemblyDet);
router.post('/poster/createPoster',verifyMiddleware.verifyToken, poster.createUserPoster); // 生成海报
router.post('/poster/findUserPoster', poster.findUserPoster); // 生成海报
// 定义登录路由，POST请求

router.post('/login', user.login); //用户登陆
router.post('/loginByWxFwh', user.loginByWxFwh); //用户登陆
router.post('/shopUserInfo', user.shopUserInfo); //用户信息
router.post('/userInfo', verifyMiddleware.verifyToken, user.userInfo); //用户信息
router.post('/updateUser', verifyMiddleware.verifyToken, user.updateUser); //更新用户信息
router.post('/getPhoneNumber', verifyMiddleware.verifyToken, user.getPhoneNumber); //获取用户手机号
router.post('/isVip', user.isVip); //用户是否是会员

router.post('/collect', verifyMiddleware.verifyToken, collect.collect); //用户收藏
router.post('/collect/list', verifyMiddleware.verifyToken, collect.list); //用户收藏列表

router.post('/downLoad/list', verifyMiddleware.verifyToken, downLoad.list); //用户下载列表

router.post('/order/moneyList', order.moneyList); //用户收益列表

router.post('/discuss/list', discuss.list);//评语接口
router.post('/contentImage/list', contentImage.list);//朋友圈文案接口

router.post('/artppt/preview', verifyMiddleware.verifyToken, artppt.preview); //预览课件图片
router.post('/artppt/list', artppt.list); //课件列表
router.post('/artppt/detail', artppt.detail); //课件详情
router.post('/artppt/downLoad', verifyMiddleware.verifyToken, artppt.downLoad); //下载课件
router.post('/artppt/nowMonthList', artppt.nowMonthList); //当月精选
//router.post('/artppt/videoAddNum', verifyMiddleware.verifyToken, artppt.videoAddNum); //播放视频增加播放数
router.post('/artppt/getLastDayUpdate', artppt.getLastDayUpdate); //获取昨日更新数据
router.post('/artppt/totalNum', artppt.totalNum); //获取总数
router.post('/artppt/typeList', artppt.typeList); //获取专题内容
router.post('/artppt/aboutList', artppt.aboutList); //获取相关推荐
router.post('/artppt/downLoadList', artppt.downLoadList); //课件相关下载
router.post('/artppt/unLockPpt', artppt.unLockPpt); //观看广告解锁课件
router.post('/artppt/baiduDownLoad', artppt.baiduDownLoad); //百度网盘文件下载

router.post('/artPainting/list', artPainting.list); //画作列表
router.post('/artPainting/detail', artPainting.detail); //画作详情
router.post('/artPainting/nowMonthList', artPainting.nowMonthList); //精选
router.post('/artPainting/totalNum', artPainting.totalNum); //获取总数

router.post('/artClass/list', artClass.list); //课件分类

router.post('/artTypeClass/list', artTypeClass.list); //专题分类

router.post('/artType/list', artType.list); //课件类型

router.post('/banner/list', banner.list); //bannerList

router.post('/todayQd', todayQd.todayQd); //用户是否已签到

router.post('/creater/confirm', creater.confirm); //申请成为创作者
router.post('/creater/save', creater.save); //上传课件
router.post('/creater/pptList', creater.list); //课件列表

router.post('/bgSetting', bgSetting.createrCanIn); //后台设置
router.post('/iosPay', bgSetting.iosPay); //ios是否可用支付
router.post('/getToken', bgSetting.getToken); //获取token

router.post('/baiduCourse/list', baiduCourse.list); //百度网盘课程列表
router.post('/baiduCourse/detail', baiduCourse.detail); //百度网盘课程详情
router.post('/baiduCourse/search', baiduCourse.search); //百度网盘课程搜索
router.post('/baiduCourse/getBaiduLink', verifyMiddleware.verifyToken, baiduCourse.getBaiduLink); //获取百度网盘分享链接（会员功能）

// 导出路由，供app.js文件调用
module.exports = router;
